<?php

namespace App\Http\Controllers\Home;

use App\Http\Controllers\Controller;
use App\Model\Area;
use Illuminate\Http\Request;


class AreaController extends Controller
{

	public function getAreaChildren($parentId) 
    {
        header("Access-Control-Allow-Origin: *");
        $areas = Area::where('pid',$parentId)->get();
        return response()->json($areas)->setEncodingOptions(JSON_UNESCAPED_UNICODE);
    }
}
